#pragma once
#include <memory>
#include "storage.h"

using namespace std;

class employee_system
{
	private:
	
struct node
{
	std::unique_ptr<employee_base> emp;
	std::unique_ptr<node> next;
	node(std::unique_ptr<employee_base> e) : emp(std::move(e)), next(nullptr) {}
}typedef node;

	unique_ptr<node> head;
	node* tail;


	public:
	employee_system();

	void add_employee(std::unique_ptr<employee_base> emp);
	void display_employees();
	void remove_employee(const std::string& ID);
	void modify_employee(const std::string &ID);
	void search_employee(const std::string &ID);
	void sort_employees();
	void delete_all_employees();
	void init_system();
	void exit_system();
	void work(const std::string& ID);
	bool check_emp(const std::string &ID);

private:
	//node* split(node* head);
    //node* merge(node* left, node* right);
    //node* merge_sort(node* head);

	//node *quick_sort(node *start, node *end);
	//node *partition(node *start, node *end);
	

};